Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #2634: Clear cache of SQL session from TaskanaEngine #2626

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Closes #2634: Clear cache of SQL session from TaskanaEngine #2626

merged 1 commit into from
Aug 7, 2024

Conversation

CRoberto1926
Copy link
Contributor

@CRoberto1926 CRoberto1926 commented Jul 29, 2024

Steps to reproduce the problem described in #2634:

  • Implement the SPI ReviewRequiredProvider in the module taskana-rest-spring-example-boot
  • Put a break point in the reviewRequired method to stop the execution
  • Start 2 instances of taskana-rest-spring-example-boot using PostgreSQL
  • Open the GUI, select a task to complete it: the break point should kick in
  • While the execution of one instance is paused, call the update task endpoint on the other instance (e.g. PUT http://localhost:8081/taskana/api/v1/tasks/:taskId) and change a custom field
  • Using another break point, check the output of getTask() in TaskServiceImpl.requestReview: without the changes in this PR, the changes in the custom field from the update in the previous point should not be there

The explanation is that this last getTask() is returning cached data from the local SQL session.

By calling the new TaskanaEngine API method implemented in this PR from the SPI ReviewRequiredProvider, the cache is cleared and the last getTask() above returns fresh data from DB.


Release Notes:


For the submitter:

Verified by the reviewer:

  • Commit message format → (Closes) #<Issue Number>: Your commit message.
  • Submitter's update to documentation is sufficient
  • SonarCloud analysis meets our standards
  • Update of the current release notes reflects changes
  • PR fulfills the ticket
  • Edge cases and unwanted side effects are tested
  • Readability

@CRoberto1926 CRoberto1926 changed the title KAD-59: Clear cache of SQL session from TaskanaEngine Closes #2634: Clear cache of SQL session from TaskanaEngine Aug 6, 2024
@gitgoodjhe gitgoodjhe merged commit 4f8e8ba into Taskana:master Aug 7, 2024
42 checks passed
@CRoberto1926 CRoberto1926 deleted the feature/KAD-59-clear-session-cache branch August 8, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants